﻿using Common.Communication;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common.Device.Interfaces
{
    public interface IFct:IDevice
    {
        /// <summary>
        /// 读取继电器
        /// </summary>
        /// <param name="index">通道</param>
        /// <returns></returns>
        Result<bool> GetJdq(int index);
        /// <summary>
        /// 设置继电器
        /// </summary>
        /// <param name="states">所有继电器状态，true闭合，false断开，null不控制</param>
        /// <returns></returns>
        Result<bool> SetJdq(List<bool?> states);
        /// <summary>
        /// 读取电平
        /// </summary>
        /// <param name="index">通道</param>
        /// <returns></returns>
        Result<bool> GetDp(int index);
    }
}
